package routers

import (
	"gin-demo/controllers/admin"
	"gin-demo/middlewares"
	"github.com/gin-gonic/gin"
)

func AdminRouterInit(r *gin.Engine) {
	AdminRouter := r.Group("/admin", middlewares.InitMiddleware)
	{
		AdminRouter.GET("/user", admin.UserController{}.Index)
		AdminRouter.POST("/user", admin.UserController{}.Add)
		AdminRouter.PUT("/user/:uid", admin.UserController{}.Edit)
	}
}
